package com.ruoyi.project.jiaqin.quotationAvaPrice.service.impl;

import com.ruoyi.common.utils.text.Convert;
import com.ruoyi.project.jiaqin.quotationAvaPrice.domain.QuotationDayAvaBean;
import com.ruoyi.project.jiaqin.quotationAvaPrice.domain.QuotationDayAveragePrice;
import com.ruoyi.project.jiaqin.quotationAvaPrice.mapper.QuotationDayAveragePriceMapper;
import com.ruoyi.project.jiaqin.quotationAvaPrice.service.IQuotationDayAveragePriceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 行情走势-单日均价Service业务层处理
 * 
 * @author LCL
 * @date 2021-10-25
 */
@Service
public class QuotationDayAveragePriceServiceImpl implements IQuotationDayAveragePriceService 
{
    @Autowired
    private QuotationDayAveragePriceMapper quotationDayAveragePriceMapper;

    /**
     * 查询行情走势-单日均价
     * 
     * @param id 行情走势-单日均价ID
     * @return 行情走势-单日均价
     */
    @Override
    public QuotationDayAveragePrice selectQuotationDayAveragePriceById(Long id)
    {
        return quotationDayAveragePriceMapper.selectQuotationDayAveragePriceById(id);
    }

    /**
     * 查询行情走势-单日均价列表
     * 
     * @param quotationDayAveragePrice 行情走势-单日均价
     * @return 行情走势-单日均价
     */
    @Override
    public List<QuotationDayAveragePrice> selectQuotationDayAveragePriceList(QuotationDayAveragePrice quotationDayAveragePrice)
    {
        return quotationDayAveragePriceMapper.selectQuotationDayAveragePriceList(quotationDayAveragePrice);
    }

    /**
     * 新增行情走势-单日均价
     * 
     * @param quotationDayAveragePrice 行情走势-单日均价
     * @return 结果
     */
    @Override
    public int insertQuotationDayAveragePrice(QuotationDayAveragePrice quotationDayAveragePrice)
    {
        return quotationDayAveragePriceMapper.insertQuotationDayAveragePrice(quotationDayAveragePrice);
    }

    /**
     * 修改行情走势-单日均价
     * 
     * @param quotationDayAveragePrice 行情走势-单日均价
     * @return 结果
     */
    @Override
    public int updateQuotationDayAveragePrice(QuotationDayAveragePrice quotationDayAveragePrice)
    {
        return quotationDayAveragePriceMapper.updateQuotationDayAveragePrice(quotationDayAveragePrice);
    }

    /**
     * 删除行情走势-单日均价对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteQuotationDayAveragePriceByIds(String ids)
    {
        return quotationDayAveragePriceMapper.deleteQuotationDayAveragePriceByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除行情走势-单日均价信息
     * 
     * @param id 行情走势-单日均价ID
     * @return 结果
     */
    @Override
    public int deleteQuotationDayAveragePriceById(Long id)
    {
        return quotationDayAveragePriceMapper.deleteQuotationDayAveragePriceById(id);
    }

    @Override
    public List<QuotationDayAveragePrice> selectQuotationListByParams(QuotationDayAvaBean bean) {
        return quotationDayAveragePriceMapper.selectQuotationListByParams(bean);
    }
}
